import request from '../utils/request';

// 登录
export function login(params) {
  return request.post('/auth/auth/login', params);
}

// 获取验证码
export function getCode(params) {
  return request.post('/auth/auth/getCode', params);
}

// 退出登录
export function logout() {
  return request.post('/auth/logout');
} 

// 刷新token
export function refreshToken(refreshTokenBCrypt) {
  return request.post('/auth/auth/refreshToken', refreshTokenBCrypt);
}

// 验证token有效性
export function validateToken(accessTokenBCrypt) {
  return request.post('/auth/auth/validateToken', accessTokenBCrypt);
}

// 获取用户Token
export function getUserToken(accessTokenBCrypt) {
  return request.post(`/auth/auth/getUserToken`,accessTokenBCrypt);
}

